<?php

namespace App\Http\Controllers;

use App\Http\Controllers\Controller;
use App\Models\Company;
use App\Services\DingService;
use App\Services\TencentFaceService;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;

class TestController extends Controller
{
    protected $TencentFaceService;
    public function __construct(TencentFaceService $TencentFaceService)
    {
        $this->TencentFaceService = $TencentFaceService;
    }

    // /**
    //  * Display a listing of the resource.
    //  *
    //  * @return \Illuminate\Http\Response
    //  */
    // public function index(Request $request)
    // {
    //     $admin = Auth::user();
    //     $company_id = $admin->company->company_id;
    //     $data = Company::find($company_id);
    //     $data = $this->DingService->getDept($data->ding_key,$data->ding_secret);
    //     $data = $this->DingService->getDeptUsers($data->ding_key,$data->ding_secret,1033474371);
    //     $data = $this->DingService->getAttendanceRecords($data->ding_key,$data->ding_secret,['0517044933691553','024104275643109403700'],'2025-08-18 00:00:00','2025-08-18 23:59:59');

    //     return response()->json(['code' => 200, 'message' => '操作成功','data'=>$data]);
    // }

    /**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */
    public function index(Request $request)
    {
        $data = $this->TencentFaceService->FaceSimilarity();
        return response()->json(['code' => 200, 'message' => '操作成功','data'=>$data]);
    }
}
